package org.liu.async;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by liuj on 2015/12/30.
 * 利用spring的factorybean 获取JobMan对象
 * #see org.liu.async.bean.ProxyFactoryBean
 */
public class TestSpring {

    /**
     *
     * @param args
     * @throws InterruptedException
     */
    public static void main(String[] args) throws InterruptedException {
        ApplicationContext applicationContext= new ClassPathXmlApplicationContext("classpath*:spring/*.xml");
        JobMan jobMan= applicationContext.getBean(JobMan.class);
        jobMan.doJob();
        System.out.println("I come out first");
    }

}
